<template>
  <div>
    <div class="father">
      <span>狗蛋年龄:{{ father }}岁</span>
      <div class="son">小狗蛋成年了吗?{{ son > 18 ? "成年" : "未成年" }}</div>
      <div>姓名{{text.uname}}</div>
      <div>年龄{{text.age/2 }}岁</div>
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      father: 999,
      son: 33,
      text: {
        uname: "六子",
        age: 17,
      },
    };
  },
};
</script>

<style lang='less'>
.father {
  width: 250px;
  height: 250px;
  background-color: purple;
  text-align: center;
  color: red;
  .son {
    margin-left: 55px;
    width: 135px;
    height: 135px;
    line-height: 70px;
    background-color: #087;
    color: #000;
  }
  div {
    color:lawngreen;
  }
}
</style>